import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router);

/*各业务route*/
import home from './home';
import setting from './setting';
import time from  './time';
import org from  './org';
import payroll from './payroll'

var routes = [].concat(home,setting,time,org,payroll).concat([
  {
    path: '*',
    component: function (resolve) {
      require.ensure([], function(){
        resolve(require('src/pages/error/error404.vue'));
      },'error');
    }
  }
]);

export default new Router({
  mode: 'hash',
  routes:routes
})
